package com.itstudio.portal.controller;

import com.itstudio.portal.entity.RestResponse;
import com.itstudio.portal.entity.vo.RoleVo;
import com.itstudio.portal.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Description:
 * @Author: zhaopengbo
 * @Date: 2024/11/21
 */
@RestController
@RequestMapping("api/role")
public class RoleController {
    @Autowired
    private RoleService roleService;
    @GetMapping("{type}")
    public RestResponse<List<RoleVo>> getRoleListByType(@PathVariable Integer type){
        return roleService.getRoleListByType(type);
    }
    @GetMapping
    public RestResponse<List<RoleVo>> getRoleList(){
        return roleService.getRoleList();
    }
}
